Skip to content

host: journal CLI launches and persist saved VM records (SL3.2b) - #1433

Merged
Pedro Henrique Penna (ppenna) merged 1 commit into
feature/nvx-refactorfrom
private/simple-1108-02e4-sl32b-20261110
Nov 10, 2026
Merged

Pedro Henrique Penna (ppenna) merged 1 commit into
feature/nvx-refactorfrom
private/simple-1108-02e4-sl32b-20261110

Conversation

@esaurez

@esaurez Enrique Saurez (esaurez) commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Scope

Part of #1108: SL3.2b only. This does not complete or close the whole issue.

The CLI store now writes the prepared capability and complete launch journal
before the caller spawns, durably records the spawned process, and commits
every SavedVm field in its runtime record. Private atomic file replacement
reuses the existing host helpers and preserves I/O causes and interrupted
launch evidence.

Command wiring remains in SL3.5b. This slice adds no liveness, interrupted-launch
recovery, termination, schema framework, or legacy store compatibility. Public
Error/Result ownership and API snapshots are unchanged.

The scoped donor is cf485b72c69d9374506f94d00bf82bcb8b5a7cad; its single
implementation delta was ported onto
c52c7101d4f66313b5f00f23b88530c38e3d0b60, without replaying historical
producer history. Preserved checkpoint branches are untouched.

Size and test accounting

256 added core lines in 4 production files, excluding blank lines, comments,
documentation and tests; 6 changed files including the test modules.

All existing tests are kept; none is rewritten or retired.
check_test_changes.py --base c52c7101d4f66313b5f00f23b88530c38e3d0b60
reports 0 existing-test changes, 0 relocations, and 16 added parsed items.
The new test file contains 8 test functions covering the pre-spawn barrier,
all saved values, interrupted and failed transitions, parse errors, unsafe
files and Windows access control.

Qualification status

Locally qualified at 99d004572b8ffad55c48bd7885278457297cbda6.
This remains Draft; full public CI and merge are not claimed.

  • Exact-head Linux store tests: 15 passed, 0 failed, 0 ignored.
  • Exact-head Windows store tests: 16 passed, 0 failed, 0 ignored.
  • Both used cargo +1.95.0 test --locked --manifest-path nvx-rs/Cargo.toml --features cli --lib host::cli::store:: -- --nocapture.
  • All prescribed non-VM checks passed on Linux and Windows: formatting,
    feature-specific Clippy and tests, documentation, MSRV and runtime-adapter
    checks. Linux also passed both public API snapshots, the macOS compile
    check and guest-binary checks.
  • Actual MSHV and WHP cold-spawn checks each ran and passed one real-guest
    test: boot marker, shell input/output, verified process identity and clean
    exit with a successful outcome. Both used the current validated guest
    inputs and the pinned clean OpenVMM revision.
  • Independent native Opus 5.5 source review found no blocking findings at
    99d004572b8ffad55c48bd7885278457297cbda6.
  • The real-runtime command on each backend was
    cargo +1.95.0 test --locked --manifest-path nvx-rs/Cargo.toml --features cli --lib host::vm::tests::current_cold_spawn_boots_a_guest_accepts_shell_input_and_exits_cleanly -- --exact --ignored --nocapture --test-threads=1, with the backend
    selected explicitly. KVM coverage and full public CI are not claimed.

The first broad Linux attempt hit a fixture's socket-length check before its
intended comma-path check. Only the process-local temporary directory changed;
the unchanged exact test and the affected full suite then passed. No assertion
or product source was weakened.

SL3.3a follows only after this slice is qualified. SL3.3b additionally needs
the actual qualified SL2.10b producer from issue #1100.

Port the scoped SL3.2b donor cf485b7 onto verified feature c52c710 without its historical producer history. Persist prepared capability and outputs before spawn, the matching process before commit, and every SavedVm field in the private runtime record.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: eb3cc7e0-f51e-45ed-b911-c7b214740e05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are identified in the durable launch-record changes.

No open issues 🎉

What changed in this PR

Implements SL3.2b of #1108, adding durable launch records to the CLI-owned sandbox store. Command wiring, liveness checks, and interrupted-launch recovery remain outside this slice.

Changes:

  • Persist the prepared capability and launch journal before spawn, then durably record the spawned process.
  • Commit every SavedVm field through private atomic file replacement while preserving interrupted-launch evidence and error causes.
  • Add tests for saved-value round trips, failed transitions, malformed records, unsafe files, and Windows access controls.
File Description
nvx-rs/​src/​host/​cli/​store/​tests/​launch.rs Tests launch ordering, persistence, failure handling, and file safety.
nvx-rs/​src/​host/​cli/​store/​tests.rs Registers the launch test module.
nvx-rs/​src/​host/​cli/​store/​record.rs Defines journal and runtime records, serialization, and capability reads.
nvx-rs/​src/​host/​cli/​store/​mod.rs Registers new modules and documents launch persistence guarantees.
nvx-rs/​src/​host/​cli/​store/​launch.rs Implements pre-spawn, process-recording, and commit transitions.
nvx-rs/​src/​host/​cli/​store/​files.rs Adds bounded private-file reads, atomic replacement, and synced removal.

Review effort: Balanced

@esaurez
Enrique Saurez (esaurez) marked this pull request as ready for review November 10, 2026 14:29
@ppenna
Pedro Henrique Penna (ppenna) merged commit 0b1a990 into feature/nvx-refactor Nov 10, 2026
163 of 165 checks passed
@ppenna
Pedro Henrique Penna (ppenna) deleted the private/simple-1108-02e4-sl32b-20261110 branch November 10, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants